﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Solidi
{
	public class DependencyResolverDecorator : IDependencyResolver
	{
		private IDependencyResolver _resolver;

		public DependencyResolverDecorator(IDependencyResolver resolver)
		{
			if (resolver == null)
			{
				throw new ArgumentNullException("resolver");
			}

			_resolver = resolver;
		}

		public virtual object Resolve(IDependencyContext context, IDependencyKey key)
		{
			return _resolver.Resolve(context, key);
		}

		public virtual bool Release(IDependencyContainer container, object instance)
		{
			return _resolver.Release(container, instance);
		}
	}
}
